/**
 * 分页指令
 *
 */
import tem from './index.html'
import $_fn from '~plugins'
class pagesCtrl {
  constructor($scope,$location,$state) {
      var search = $location.search()
      $scope.maxSize = 5;
      $scope.current = parseInt(search.pageNum)
      $scope.pageChanged = function() {
          $scope.$parent.getDada($scope.current,$scope.$parent.params)
      };
  }
}

pagesCtrl.$inject = ['$scope','$location','$state']
module.exports = angular.module('directive.pages', []).directive('pages', function() {
    return {
        template: tem,
        replace:true,
        scope: {
            total:"@",
            pageSize:"@",
            current:"="
        },
        controller: pagesCtrl,
        link:function(scope){
        }
    }
}).name